import { EConfigItemPropsType, EDoneJsonType, IConfigItem } from '@/config-center/types';

export const public_text_ht: IConfigItem = {
  name: 'public-text-ht',
  title: '文本',
  tag: 'public-text-ht',
  type: EDoneJsonType.CustomSvg,
  config: {
    can_zoom: false,
    have_anchor: false,
    actual_rect: false
  },
  display: true,
  props: {
    text: {
      title: '文字内容',
      type: EConfigItemPropsType.Input,
      val: '文本'
    },
    fontFamily: {
      title: '字体',
      type: EConfigItemPropsType.Select,
      val: 'Microsoft YaHei',
      options: [
        {
          value: 'Microsoft YaHei',
          label: '微软雅黑'
        },
        {
          value: 'NSimSun',
          label: '新宋体'
        }
      ]
    },
    rotate: {
      title: '方向',
      type: EConfigItemPropsType.Select,
      val: 0,
      options: [
        {
          value: 0,
          label: '水平'
        },
        {
          value: -90,
          label: '垂直'
        }
      ]
    },
    fill: {
      title: '文字颜色',
      type: EConfigItemPropsType.Color,
      val: 'rgba(200, 222, 254, 1)'
    },
    fontSize: {
      title: '文字大小',
      type: EConfigItemPropsType.InputNumber,
      val: 12
    }
  },
  common_animations: {
    val: '',
    delay: 'delay-0s',
    speed: 'slow',
    repeat: 'infinite'
  }
};

export const public_text_bg: IConfigItem = {
  name: 'public-text-bg',
  title: '背景文本',
  tag: 'public-text-bg',
  type: EDoneJsonType.CustomSvg,
  config: {
    can_zoom: false,
    have_anchor: false,
    actual_rect: false
  },
  display: true,
  props: {
    text: {
      title: '文字内容',
      type: EConfigItemPropsType.Input,
      val: '文本'
    },
    fontFamily: {
      title: '字体',
      type: EConfigItemPropsType.Select,
      val: 'Microsoft YaHei',
      options: [
        {
          value: 'Microsoft YaHei',
          label: '微软雅黑'
        },
        {
          value: 'NSimSun',
          label: '新宋体'
        }
      ]
    },
    fill: {
      title: '文字颜色',
      type: EConfigItemPropsType.Color,
      val: 'rgb(65,65,65)'
    },
    fontSize: {
      title: '文字大小',
      type: EConfigItemPropsType.InputNumber,
      val: 12
    },
    textY: {
      title: '文字高度',
      type: EConfigItemPropsType.InputNumber,
      val: 13
    },
    bgFill: {
      title: '背景颜色',
      type: EConfigItemPropsType.Color,
      val: 'rgb(133, 206, 97)'
    },
    bgwidth: {
      title: '背景宽度',
      type: EConfigItemPropsType.InputNumber,
      val: 50
    },
    bgheight: {
      title: '背景高度',
      type: EConfigItemPropsType.InputNumber,
      val: 20
    }
  },
  common_animations: {
    val: '',
    delay: 'delay-0s',
    speed: 'slow',
    repeat: 'infinite'
  }
};
